<?php
/**
 * Created by PhpStorm.
 * User: sunshubo
 * Date: 2017/12/12
 * Time: 9:57
 */

class ModifyActiveInfo_model extends MY_Model
{
    function modify_info($body)
    {
        $table = 'ws_active_list';
        $where = array('id' => $body->data->form->id);
        $query = $this->my_select($table, $where);
        if (!$query) {//项目不存在
            return false;
        }

        //项目存在
        $set = array('data' => json_encode($body->data));
        $query = $this->my_update($table, $where, $set);
        if ($query) {
            return true;
        }
        return false;
    }
}